Skip to content

fix(api-catalog): resync spec drift and test the whole workspace in CI - #241

Merged
jpage-godaddy merged 2 commits into
mainfrom
fix/api-catalog-workspace-drift
Sep 1, 2026
Merged

fix(api-catalog): resync spec drift and test the whole workspace in CI#241
jpage-godaddy merged 2 commits into
mainfrom
fix/api-catalog-workspace-drift

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • Regenerates the embedded API catalog / domains-client codegen spec / hosting-nodejs spec via cargo run -p generate-api-catalog, resolving the drift flagged by API catalog drift #33455833918: domains v3 gained a getRegistrationSchema endpoint, and hosting-nodejs v1 added deprecation notices on rollbackApp and updateAppSecrets.
  • Fixes cicd.yml and rust-port-alpha.yaml to run cargo check/clippy/test with --workspace. This workspace has a root package (godaddy-cli) plus domains-client and generate-api-catalog as members with no default-members override, so plain cargo test has only ever covered the root package — domains-client's own test module has never actually compiled or run in CI, on PRs or otherwise.
  • Fixes the five compile errors and one runtime bug that gap was hiding in domains-client/src/lib.rs's tests (all pre-existing on main, unrelated to the spec resync above — verified against unmodified main before touching anything): optimize_for became Option-wrapped, ConsentActorType/AgreementType moved from generated enums to open string newtypes, DnsRecord gained a required parameters field, Agreements's privacy setter was renamed to v1_privacy, and a mock asserted the wrong wire query-param name (privacy instead of the API's actual v1-privacy, confirmed directly against the live upstream spec).
  • Updates AGENTS.md's documented commands/checklist to match (--workspace everywhere).

Test plan

  • cargo check --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --check
  • cargo test --workspace (752 + 15 + 15 passed across all three crates)
  • ./rust/scripts/check-module-size.sh
  • No unresolved external $refs in the regenerated catalog (CICD's own check)
  • Forced a rebuild of domains-client to confirm progenitor codegen compiles against the new getRegistrationSchema operation

🤖 Generated with Claude Code

jpage-godaddy and others added 2 commits September 1, 2026 10:14
Domains v3 gained a getRegistrationSchema endpoint (and RegistrationSchema
type), and the hosting-nodejs v1 spec added deprecation notices on
rollbackApp and updateAppSecrets. Regenerated via `cargo run -p
generate-api-catalog`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
`cargo test`/`check`/`clippy` with no flags only cover the root package
in a workspace that also declares one (this one does: godaddy-cli plus
domains-client and generate-api-catalog as members, no default-members
override). CICD and the main-alpha workflow both ran plain `cargo test`,
so domains-client's test module has been silently skipped since the
workspace was split into multiple crates — its tests never compiled, on
PRs or otherwise.

That hid five compile errors and one runtime bug in domains-client's own
tests, all pre-existing and unrelated to this branch's spec resync
(confirmed against unmodified main): `optimize_for` became optional,
`ConsentActorType`/`AgreementType` moved from generated enums to open
string newtypes, `DnsRecord` gained a required `parameters` field,
`Agreements`'s `privacy` setter was renamed to `v1_privacy`, and the
`v1-agreements` mock asserted the wrong wire query-parameter name
(`privacy` instead of the API's actual `v1-privacy`) once the compile
errors above stopped masking it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 1, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resynchronizes the embedded API catalog and domains-client OpenAPI inputs with upstream spec drift, and updates CI/agent guidance to run Rust checks across the entire workspace (so domains-client and generate-api-catalog are covered in PR CI).

Changes:

  • Regenerated API catalog artifacts to reflect new/updated endpoints and descriptions (domains v3 getRegistrationSchema; hosting-nodejs v1 deprecation/supersession notes).
  • Fixed CI workflows to run cargo check/clippy/test with --workspace under rust/.
  • Updated domains-client tests to match regenerated types/params (Option-wrapped fields, open-string newtypes, required fields, and corrected v1-privacy query param + setter rename).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rust/schemas/openapi/hosting-nodejs-public-v1.yaml Adds v1 operation descriptions (and deprecation marker) aligned with upstream hosting-nodejs spec.
rust/schemas/api/manifest.json Updates generation timestamp and increments domains endpoint count to reflect the new endpoint.
rust/schemas/api/hosting-nodejs.json Regenerated catalog entry text for rollbackApp and updateAppSecrets descriptions.
rust/schemas/api/domains.json Adds RegistrationSchema schema and the getRegistrationSchema endpoint entry.
rust/domains-client/src/lib.rs Fixes/updates the crate’s test module to compile/run under the regenerated types and correct query param naming.
rust/domains-client/openapi/domains.oas3.json Updates the domains-client OpenAPI input with the new registration schema endpoint and component schema.
AGENTS.md Updates documented Rust commands/checklist to consistently use --workspace.
.github/workflows/rust-port-alpha.yaml Runs clippy/tests against the entire Rust workspace.
.github/workflows/cicd.yml Runs check/clippy/tests against the entire Rust workspace to ensure all member crates are covered.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jpage-godaddy
jpage-godaddy merged commit efe8749 into main Sep 1, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the fix/api-catalog-workspace-drift branch September 1, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants